home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / devices / keymap.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  2KB  |  77 lines

  1. #ifndef    DEVICES_KEYMAP_H
  2. #define    DEVICES_KEYMAP_H
  3. /*
  4. **    $Filename: devices/keymap.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.3 $
  7. **    $Date: 90/04/13 $
  8. **
  9. **    key map definitions for keymap.resource, keymap.library, and
  10. **    console.device
  11. **
  12. **    (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  13. **        All Rights Reserved
  14. */
  15.  
  16. #ifndef EXEC_NODES_H
  17. #include    "exec/nodes.h"
  18. #endif
  19. #ifndef EXEC_LISTS_H
  20. #include    "exec/lists.h"
  21. #endif
  22.  
  23. struct     KeyMap {
  24.     UBYTE   *km_LoKeyMapTypes;
  25.     ULONG   *km_LoKeyMap;
  26.     UBYTE   *km_LoCapsable;
  27.     UBYTE   *km_LoRepeatable;
  28.     UBYTE   *km_HiKeyMapTypes;
  29.     ULONG   *km_HiKeyMap;
  30.     UBYTE   *km_HiCapsable;
  31.     UBYTE   *km_HiRepeatable;
  32. };
  33.  
  34. struct    KeyMapNode {
  35.     struct Node kn_Node;    /* including name of keymap */
  36.     struct KeyMap kn_KeyMap;
  37. };
  38.  
  39. /* the structure of keymap.resource */
  40. struct    KeyMapResource {
  41.     struct Node kr_Node;
  42.     struct List kr_List;    /* a list of KeyMapNodes */
  43. };
  44.  
  45. /* Key Map Types */
  46. #define  KC_NOQUAL   0
  47. #define  KC_VANILLA  7        /* note that SHIFT+ALT+CTRL is VANILLA */
  48. #define  KCB_SHIFT   0
  49. #define  KCF_SHIFT   0x01
  50. #define  KCB_ALT     1
  51. #define  KCF_ALT     0x02
  52. #define  KCB_CONTROL 2
  53. #define  KCF_CONTROL 0x04
  54. #define  KCB_DOWNUP  3
  55. #define  KCF_DOWNUP  0x08
  56.  
  57. #define  KCB_DEAD    5        /* may be dead or modified by dead key: */
  58. #define  KCF_DEAD    0x20    /*   use dead prefix bytes        */
  59.  
  60. #define  KCB_STRING  6
  61. #define  KCF_STRING  0x40
  62.  
  63. #define  KCB_NOP     7
  64. #define  KCF_NOP     0x80
  65.  
  66.  
  67. /* Dead Prefix Bytes */
  68. #define DPB_MOD    0
  69. #define DPF_MOD    0x01
  70. #define DPB_DEAD    3
  71. #define DPF_DEAD    0x08
  72.  
  73. #define DP_2DINDEXMASK    0x0f    /* mask for index for 1st of two dead keys */
  74. #define DP_2DFACSHIFT    4    /* shift for factor for 1st of two dead keys */
  75.  
  76. #endif    /* DEVICES_KEYMAP_H */
  77.